package com.ruge.seckill.domain.model;

import com.ruge.core.domain.BaseDomain;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author ruge.wu
 * @since 2022/1/26 15:48
 */
@Getter
@Setter
@Builder
@Entity
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "sec_kill_coupon")
@org.hibernate.annotations.Table(appliesTo = "sec_kill_coupon", comment = "秒杀信息关联表")
public class SeckillCoupon extends BaseDomain implements Serializable {
    @Column(columnDefinition = "varchar(20) comment '优惠券id'")
    private String couponId;
    @Column(columnDefinition = "int comment '秒杀数量'")
    private int amount;
    @Column(columnDefinition = "datetime comment '秒杀开始时间'")
    private Date startTime;
    @Column(columnDefinition = "datetime comment '秒杀结束时间'")
    private Date endTime;
}
